<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE HTML>
<html>
<head>
    <title>屌丝备考</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width; initial-scale=1.0">
    <meta name="viewport" content="directive,directive">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
    <meta name="format-detection" content="telephone=no" />
    <meta name='apple-touch-fullscreen' content='yes' />
    <meta name="full-screen" content="yes">
    <link href='<c:url value="/sharepage/css/base.css" />' rel="stylesheet" type="text/css"/>
    <link href='<c:url value="/sharepage/css/layout.css" />' rel="stylesheet" type="text/css"/>
    <link href='<c:url value="/sharepage/css/layout2.css" />' rel="stylesheet" type="text/css"/>
    <link href='<c:url value="/sharepage/css/layout5.css" />' rel="stylesheet" type="text/css"/>
    <link href='<c:url value="/sharepage/css/layout6.css" />' rel="stylesheet" type="text/css"/>
</head>
<body>
<div class="wrap">

	<div class="download-wrapper">
		<div class="download">
		  <img src='<c:url value="/sharepage/img/download-img.png" />' class="download-img">
		    <span class="span1">托福21天app</span>
		    <span class="span2">特约提供</span>
		  <img src='<c:url value="/sharepage/img/download.png" />' class="download-img2">
		</div>
	</div>
	<div class="all">
	  <ul>
	  <c:forEach var="topic" items="${topics }">
	    <a class="item" value="${topic.id }" href="javascript:void(0)" >
	     <li>
	        <p class="all-h3">${topic.title }</p>
	        <c:choose>
	         <c:when test="${fn:length(topic.content) > 45}">
	           <p class="all-p">${fn:substring(topic.content, 0, 45)}...</p>
	         </c:when>
	         <c:otherwise>
	           <p class="all-p">${topic.content}</p>
	         </c:otherwise>
	       </c:choose>
	     </li>
	    </a>
	  </c:forEach>
	  </ul>
	</div>
  
</div>
</body>
<script src="<c:url value="/js/1.11.1.js" />" type="text/javascript"></script>
<script>
$(document).on("click",".item",function(){
	var url = '<c:url value="/share/topic/" />' + $(this).attr("value");
	window.location.href=url;
});
$(document).on("click",".download-img2",function(){
	var url = '<c:url value="/sharepage/TESTOS.html" />';
	window.location.href=url;
});
</script>
</html>